<form action="?action=save" method="post">
    <div class="form-group">
        <label for="name">名称</label>
        <input type="text" id="name" name="name" class="form-control" value="<?php e($tag['name']); ?>">
    </div>

    <button class="btn btn-primary" type="submit">
        <?php echo $tag['id'] ? '保存' : '添加新标签'; ?>
    </button>

    <input type="hidden" name="id" value="<?php echo $tag['id']; ?>">
    <?php echo csrf_token_hidden_input_html(); ?>
</form>